<%- include ../public/page_header.html %>


    <div class="panel panel-default">              
        <div class="panel-heading clear">
            <span>商品类型属性---- <%= goodsType.title %></span><a href="/admin/goodsTypeAttribute/add?id=<%=cate_id%>" class="btn btn-primary fr">增加商品类型属性</a>
        </div>
        <div class="panel-body">
            <!--列表展示-->
            <div class="table-responsive">
                <table class="table table-bordered">
                    <thead>
                    <tr class="th">
                        <th>属性名称</th>
                        <th>商品类型</th>
                        <th>属性值的录入方式</th>                                
                        <th>可选值列表</th>          
                        <th>增加时间</th>  
                        <th class="text-center">状态</th>                                                
                    
                        <th class="text-center">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                        <% for(var i=0;i<list.length;i++){ %>

                            <tr>
                                <td><%= list[i].title %></td>
                                
                                <td><%= list[i].goods_type[0].title %></td>
                                <td>                                                
                                    <% if(list[i].attr_type==1){ %>
                                        单行文本框
                                    <% }else if(list[i].attr_type==2){ %>
                                        多行文本框                                                 
                                    <% }else if(list[i].attr_type==3){ %>
                                        select下拉框   
                                    <% } %>                                                
                                </td>
                                <td><%= list[i].attr_value %></td>

                                <td><%= helper.formatTime(list[i].add_time) %></td>

                                <td  class="text-center">
                                        <% if(list[i].status==1){ %>
                                                <img src="/public/admin/images/yes.gif" onclick="app.changeStatus(this,'GoodsTypeAttribute','status','<%=list[i]._id%>')" />
                                        <% }else{ %>
                                                <img src="/public/admin/images/no.gif" onclick="app.changeStatus(this,'GoodsTypeAttribute','status','<%=list[i]._id%>')" />
                                        <% } %>
                                </td>    
                                                    
                                <td class="text-center"><a href="/admin/goodsTypeAttribute/edit?id=<%=list[i]._id%>">修改</a>　<a  class="delete" href="/admin/delete?model=GoodsTypeAttribute&id=<%=list[i]._id%>">删除</a></td>
                            </tr>
                                    
                        <%}%>
                    </tbody>
                </table>
            </div>
        </div>
    </div>


</body>
</html>